﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 汽车
{
    internal class Car : Auto
    {
        private bool airConditioning;
        private bool cdPlayer;

        public Car(int tireCount, string color, double weight, double speed, bool airConditioning, bool cdPlayer) : base(tireCount, color, weight, speed)
        {
            this.airConditioning = airConditioning;
            this.cdPlayer = cdPlayer;
        }

        public override void Accelerate()
        {
            speed += 15;
            Console.WriteLine($"小汽车正在加速, 当前速度为: {speed} km/h");
        }

        public override void Decelerate()
        {
            speed -= 15;
            if(speed < 0) {  speed = 0; }
            Console.WriteLine($"小汽车正在减速, 当前速度为: {speed} km/h");
        }


    }
}
